<?php
$banTin = $this->banTin;
$banTin instanceof Application_Model_bean_BanTin;
$maDanhMucBanTin = $banTin->getMaDanhMucBanTin ();
echo 'ten ' . $banTin->getTieuDe ();
$listDanhMuc = $this->danhMuc;
?>


<div class="center_title_bar">Edit bản tin</div>
<div class="prod_box_big">
<div class="top_prod_box_big"></div>
<div class="center_prod_box_big">
<form
	action="<?php
	echo $this->url ( array ('action' => 'updatesuccess' ) );
	?>"
	method="post" enctype="multipart/form-data" id="myForm">

<p><label>Tiêu đề bản tin</label> <input type="text" name="tieuDe"
	value="<?php
	echo $banTin->getTieuDe ()?>"></p>

<p><label>Tên Tags</label> <input type="text" name="tab"
	value="<?php
	echo $banTin->getTab ()?>"></p>

<p><label>Danh mục bản tin</label> <select name="maDanhMucBanTin">
	<option>Chọn danh mục</option>
		<?php
		foreach ( $listDanhMuc as $value ) {
			$value instanceof Application_Model_bean_DanhMucBanTin;
			$itId = $value->getMaDanhMuc ();
			if ($itId == $maDanhMucBanTin) {
				echo '<option value="' . $itId . '" selected="selected">' . $value->getTenDanhMuc () . ' </option>';
			} else {
				echo '<option value="' . $itId . '" >' . $value->getTenDanhMuc () . ' </option>';
			}
		}
		?>
</select></p>

<br /><br />
<p><label>Nội dung bản tin</label> <textarea rows="10" cols="50"
	name="noiDung"><?php
	echo $banTin->getNoiDung ()?></textarea></p>

<h3>Hình ảnh bản tin</h3>
<p><label>File ảnh : </label><input type="file" name="file"></input> <br />
</p>
<br /><br />
<p align="center">
<input type="submit" value="Update" /> <input type="hidden"
	name="maBanTin" value="<?php
	echo $banTin->getMaBanTin ()?>"></input></form>
</p>
</div>
<div class="bottom_prod_box_big"></div>
</div>


















